package com.example.vertification.service;

import com.example.vertification.entity.UserShop;
import com.example.vertification.entity.UserStation;
import com.example.vertification.repository.UserShopRepository;
import com.example.vertification.repository.UserStationRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserShopService {


    private final UserShopRepository userShopRepository;

    @Autowired
    public UserShopService(UserShopRepository userShopRepository) {
        this.userShopRepository = userShopRepository;
    }

    public UserShop getEntityByUid(long uid) {
        return userShopRepository.findByUid(uid);
    }


    public UserShop save(UserShop e) {
        return userShopRepository.save(e);
    }
    public List<UserShop> findAll() {
        return userShopRepository.findAll();
    }

}